<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/mycss/test.css" type="text/css" rel="stylesheet"  media="screen" />
<link rel="stylesheet" href="resources/css/reset.css" type="text/css" media="screen" />
<!-- Main Stylesheet -->
<link rel="stylesheet" href="resources/css/style.css" type="text/css" media="screen" />
<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="resources/css/invalid.css" type="text/css" media="screen" />

<link rel="stylesheet" href="css/mycss/my.css" type="text/css" media="screen" />

<!--                       Javascripts                       -->
<!-- jQuery -->
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<!-- jQuery Configuration -->
<script type="text/javascript" src="resources/scripts/simpla.jquery.configuration.js"></script>
<!-- Facebox jQuery Plugin -->
<script type="text/javascript" src="resources/scripts/facebox.js"></script>
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script>
<!-- jQuery Datepicker Plugin -->

<script>
$(document).ready(function(){
	initSplbf();
});

function initSplbf(){
	var splbfid="${spxxBean.splbfid}";
	var ppid="${spxxBean.ppid}";
	var splbsid="${spxxBean.splbsid}";
	var xhid="${spxxBean.xhid}";
	var jgqjid="${spxxBean.jgqjid}";
	var kczt="${spxxBean.kczt}";
	var pageNumFin="${page.pageNumFin}";
	var spxxpxid="${spxxBean.spxxpx.pxid}";
	
	if(splbfid!=0){
		$("#Splbfid_"+splbfid).attr("selected","selected");
		$("#splbsSpan").show();
	}else{
		$("#splbsSpan").hide();
	}
	if(ppid!=0){
		$("#Splbfid_"+splbfid).attr("selected","selected");
		$("#sppp_"+ppid).attr("selected","selected");
	}
	if(splbsid!=0){
		$("#splbs_"+splbsid).attr("selected","selected");
	}
	if(xhid!=0){
		$("#xhid_"+xhid).attr("selected","selected");
	}
	if(jgqjid!=0){
		$("#jgqj_"+xhid).attr("selected","selected");
	}
	if(kczt!=0){
		$("#kczt_"+kczt).attr("selected","selected");
	}
	$("#spxxpxSelect_"+spxxpxid).attr("selected","selected");
	
	
	if(xhid!=0&&kczt!=1){
		$("#xhjstsid").show();
	}else{
		$("#xhjstsid").hide();
	}
	
	 $("#pageNumFinSeleft_"+pageNumFin).attr("selected","selected");
	 $("#pageNumFinSelefd_"+pageNumFin).attr("selected","selected");
}


function goToPage(cpage){
	$("#gotopageNumId").val(cpage);//设置要去的页数
	//alert($("#gotopageNumId").val());
	submitForm();//提交检索表单
}
function changePageNumfin(num){
	$("#pageNumSet").val(num);//设置要去的页数
	submitForm();
}
function downye(){
	var zys="${page.zys}";//总页数
	var cpage="${page.cpage}";//当前页
	if(cpage<zys){
		goToPage(parseInt(cpage)+1);
	}
}
function upye(){
	var zys="${page.zys}";//总页数
	var cpage="${page.cpage}";//当前页
	if(cpage>1){
		goToPage(parseInt(cpage)-1);
	}
}
function submitForm(){
	$("#searchBoxSubmitid").submit();
}

function delfxx(xxid,fxxid){
	 var cf=confirm("你确定要删除该菜单项吗？");
	 if(cf==true){
		 delAjax(xxid,fxxid);
	 }else{
		 return false;
	 }
}

function delAjax(xxid,fxxid){
	 $.ajax({
		    url: "deleteXx.action",
		    type: "post",
		    data: "xxBean.xxid="+xxid+"&xxBean.fxxid="+fxxid,
		    datetype: "json",
		    success: function(date) {
		    	var flag=date.bflag;
		    	if(flag){
		    		window.location=encodeURI("../admin/findlistXx.action");
		    	}else{
		    		alert("删除失败")
		    	}
		     }
		 });
}

function clickSplbf(id){
	window.location=encodeURI("../admin/listSpxxgl.action?spxxBean.splbfid="+id);
}
function kcEdit(spxxid,splbfid){
	//alert("test");
	window.location=encodeURI("../admin/listKcxxgl.action?spxxBean.spxxid="+spxxid+"&spxxBean.splbfid="+splbfid);
}


</script>


<#assign s=JspTaglibs["/WEB-INF/tld/struts-tags.tld"] />



<title>无标题文档</title>
</head>

<body>

  <div id="main-content">
    <!-- Main Content Section with everything -->
    <noscript>
    <!-- Show a notification if the user has disabled javascript -->
    </noscript>
    <!-- End .clear -->
          <!-- Start Content Box -->
      <div class="content-box column-left">
      <div class="content-box-header">
        <h3>检索条件</h3>

      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab">
        <div class="notification attention png_bg" id="xhjstsid" > <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
            <div>型号检索，必须在库存选项为“有”的情况下有效 </div>
          </div>
        <form id="searchBoxSubmitid" action="listSpxxgl.action" class="myForm">
        <input id="gotopageNumId" type="hidden" name="cpage" value="1"/>
         <input id="pageNumSet" type="hidden" name="pageNumSet" value="${page.pageNumFin}"/>
        <span><b>商品类别：</b>
                  <select class="myinputStyle" name="spxxBean.splbfid" >
          		<option value="0" onclick="clickSplbf(0)">所有类别</option>
          		 <@s.iterator id="splbf" value="listSplbf">
          		 <option id="Splbfid_<@s.property value='#splbf.splbfid'/>" value="<@s.property value='#splbf.splbfid'/>" onclick="clickSplbf(<@s.property value='#splbf.splbfid'/>)"><@s.property value='#splbf.splbm'/></option>
          		 </@s.iterator>
          </select>
          <span id="splbsSpan">
        	<b>品牌：</b>
                  <select class="myinputStyle" name="spxxBean.ppid" >
          		<option value="0" onclick="submitForm()">全部</option>
          		 <@s.iterator id="sppp" value="mapSplbs.lstSppp">
          		 <option onclick="submitForm()" id="sppp_<@s.property value='#sppp.spppid'/>" value="<@s.property value='#sppp.spppid'/>" ><@s.property value='#sppp.spppm'/></option>
          		 </@s.iterator>
          </select>
          <b>功能：</b>
                  <select class="myinputStyle" name="spxxBean.splbsid" >
          		<option value="0" onclick="submitForm()">全部</option>
          		<@s.iterator id="splbs" value="mapSplbs.lstSplbs">
          		<option onclick="submitForm()" id="splbs_<@s.property value='#splbs.splbsid'/>" value="<@s.property value='#splbs.splbsid'/>""><@s.property value='#splbs.splbm'/></option>
          		</@s.iterator>
          </select>
          <b>型号：</b>
                  <select class="myinputStyle" name="spxxBean.xhid" >
          		<option onclick="submitForm()" value="0">全部</option>
          		<@s.iterator id="spxh" value="mapSplbs.lstSpxh">
          		<option onclick="submitForm()" id="xhid_<@s.property value='#spxh.xhid'/>" value="<@s.property value='#spxh.xhid'/>"><@s.property value='#spxh.spxhnr'/></option>
          		</@s.iterator>
          </select>
          </span>
          <b>价格区间：</b>
                  <select class="myinputStyle" name="spxxBean.jgqjid" >
          		<option onclick="submitForm()" value="0">全部</option>
          		<@s.iterator id="jgqj" value="lstJgqj">
          		<option onclick="submitForm()" id="jgqj_<@s.property value='#jgqj.jgqjid'/>" value="<@s.property value='#jgqj.jgqjid'/>"><@s.property value='#jgqj.jgqjnr'/></option>
          		</@s.iterator>
          </select>
          <b>库存</b>
           <select name="spxxBean.kczt" >
          		<option onclick="submitForm()" value="0">全部</option>
          		<option onclick="submitForm()" id="kczt_1" value="1">有</option>
          		<option onclick="submitForm()" id="kczt_2"value="2">无</option>
          </select>
          </span><br/><br/><br/>
          <span>
          <b>标题、货号</b>
         <input class="text-input small-input" type="text" id="small-input" name="spxxBean.searchString" />
         <input class="button" type="submit" value="检索" />
         <span style="margin-left:30px;">
                  <b>排序方式</b>
         <select class="myinputStyle" name="spxxBean.spxxpx.pxid">
         <@s.iterator id="spxxpx" value="lstSpxxpx">
       		 <option id="spxxpxSelect_<@s.property value='#spxxpx.pxid'/>" value="<@s.property value='#spxxpx.pxid'/>" onclick="submitForm()"><@s.property value='#spxxpx.pxsm'/></option>
       	</@s.iterator>
       	 </select>
   	    	  每页显示
             <select>
               <option value="5" onclick="changePageNumfin(5)" id="pageNumFinSeleft_5">5</option>
               <option value="10" onclick="changePageNumfin(10)" id="pageNumFinSeleft_10">10</option>
               <option value="15" onclick="changePageNumfin(15)" id="pageNumFinSeleft_15">15</option>
               <option value="20" onclick="changePageNumfin(20)" id="pageNumFinSeleft_20">20</option>
               <option value="30" onclick="changePageNumfin(30)" id="pageNumFinSeleft_30">30</option>
               <option value="40" onclick="changePageNumfin(40)" id="pageNumFinSeleft_40">40</option>
               <option value="50" onclick="changePageNumfin(50)" id="pageNumFinSeleft_50">50</option>
             </select>
            	 条数据
		</span>
          </span>
          </form>
        </div>
        <!-- End #tab3 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <div style="clear:both;"></div>
    <div class="content-box">
      <div class="content-box-header">
        <h3>商品列表</h3>
        <ul class="content-box-tabs">
          <li></li>
          <!-- href must be unique and match the id of target div -->
          <li></li>
        </ul>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
              <a href="loadSpxxgl.action"  title="添加">添加</a>
          <table>
            <thead>
              <tr>
                <th>图片</th>
                <th>货号</th>
                <th>标题</th>
                <th>进货价格</th>
                <th>市场价格</th>
                <th>销售价格</th>
                <th>库存</th>
                <th>操作</th>
              </tr>
            </thead>
 			<tfoot>
              <tr>
                <td colspan="6">
                  <div class="bulk-actions align-right" >
                    <select name="dropdown">
                      <option value="option1"></option>
                    </select>
                    </div>
                  <div class="pagination">
                  <span>共有<b>${page.jlzts}</b>条数据,当前<b>${page.cpage}/${page.zys}</b></span>
                   <a href="#" title="First Page" onclick="goToPage(1)">&laquo; 首页</a><a id="uppageid" href="#" title="Previous Page" onclick="upye()">&laquo; 上一页</a><a href="#" onclick="downye()" title="Previous Page">下一页 &raquo; </a><a href="#" title="Last Page" onclick="goToPage(${page.zys})">末页 &raquo;</a> </div>
                  <!-- End .pagination -->
                  <div class="clear"></div>
                </td>
              </tr>
            </tfoot>

            <@s.iterator id="spxx" value="lstSpxx">	
              <tr>
                <td><img width="20" height="20" src="<@s.property value='#spxx.sptp'/>"/></td>
                <td><@s.property value='#spxx.sphh'/></td>
                <td>
               
					<@s.if test="#spxx.spbt.length()>35">
               		 <@s.property value="#spxx.spbt.substring(0,35)+'...'"/>
					</@s.if>
					<@s.else>
					<@s.property value="#spxx.spbt"/>
					</@s.else>
                </td>
                <td><@s.property value='#spxx.jhjg'/></td>
                <td><@s.property value='#spxx.spyj'/></td>
                <td><@s.property value='#spxx.spsj'/></td>
                <td><a href="#" onclick="kcEdit(<@s.property value="#spxx.spxxid"/>,<@s.property value="#spxx.splbfid"/>)"><@s.property value='#spxx.kcsl'/></a></td>
                <td>
                  <!-- Icons -->
                  <a href="#" title="Edit"><img src="images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete" onclick=""><img src="images/icons/cross.png" alt="Delete"  /></a> <a onclick="kcEdit(<@s.property value="#spxx.spxxid"/>,<@s.property value="#spxx.splbfid"/>)"href="#"  title="Edit Meta"><img src="images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td>
              </tr>
            </@s.iterator>
            </tbody>
          </table>
        </div>
        <!-- End #tab1 -->
        <div class="tab-content" id="tab2"></div>
        <!-- End #tab2 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box --><!-- Start Notifications --><!-- End Notifications -->
<div id="footer"> <small>
      &#169; Copyright 2011 Your Company | Powered by <a href="#">kimxc11@gmail.com</a> | <a href="#">Top</a> </small> </div>
  <!-- End #footer -->
  
  
    <div id="messages" style="display: none">
          <form id="saveXxFrom" action="saveXx.action" method="post">
          <input type="hidden" name="xxBean.fxxid" value="0"/>
          <fieldset style="margin-top:20px;" >
          <label class="search_lable">菜单名</label>
         <input class="search_myself" name="xxBean.xxm" type="text"/>
          </fieldset>
          <fieldset style="margin-top:20px;">
          <label class="search_lable" >排&nbsp;&nbsp;&nbsp;序</label>
          <input class="search_myself" name="xxBean.px" type="text"/>
          </fieldset>
           <fieldset style="margin-top:20px;">
          <input class="button" type="submit" value="保存" />
          </fieldset>
        </form>
      </div> 
</div>

</body>
</html>
